package edu.sctu.practice.class02.hujie.cgs.assign08.two;

import java.awt.*;
import java.io.*;
import java.net.*;

/**
 * Created by hp on 2015/12/21.
 */
public class ServerThread extends Thread {
    Socket socket;
    ObjectInputStream in=null;
    ObjectOutputStream out=null;
    String s=null;
    ServerThread(Socket t){
        socket=t;
        try {
            out=new ObjectOutputStream(socket.getOutputStream());
            in=new ObjectInputStream(socket.getInputStream());
        }catch (IOException e){}
    }
    public void run(){
        TextArea text=new TextArea("你好，我是服务器",12,12);
        try {
            out.writeObject(text);
        }catch (IOException e){
            System.out.println("客户离开");
        }
    }
}
